<template>
    <div id="floatingWindow" v-on:dblclick="openMainWindow" >
        <div class="logo"></div>
        <div class="content" >
            <div class="text" >拖拽上传</div>
        </div>
    </div>
</template>

<script lang="ts">
  import {ipcRenderer} from 'electron'
  export default {
    name: 'float-box',
    methods: {
      openMainWindow () {
        ipcRenderer.send('showMainWindow')
      }
    }
  }
</script>

<style lang="scss">
    #floatingWindow {
        -webkit-app-region: drag;
        -webkit-user-select: none;
        cursor: pointer;
        overflow: hidden;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        cursor: pointer !important;
        border-radius: 4px;
        display: flex;
        border: 1px solid #3388fe;

        .text {
            height: 25px;
            line-height: 25px;
            font-size: 12px;
            text-align: center;
            color: #74a1fa;
        }

        .logo {
            width: 40px;
            background: #5b9bfe url("/static/imgs/logo@2x.png") no-repeat 2px 3px;
            background-size: 80%;
        }

        .content {
            background-color: #eef4fe;
            width: 100px;
        }
    }
</style>
